#!/bin/bash
#=================================================================
# date: 2021-06-25 14:59:28
# title: run_srs
# author: QRS
#=================================================================


CUR_FIL=${BASH_SOURCE[0]}
TOP_DIR=`cd $(dirname $CUR_FIL)/..; pwd`

VENDOR=hzcsai_com
PROJECT=srs
REPOSITORY="ossrs/srs:v4.0.177"

__start__()
{
    docker container stop ${PROJECT}-test 2>/dev/null
    docker container rm ${PROJECT}-test 2>/dev/null

    docker run -dit --name ${PROJECT}-test \
        --shm-size=10g --ulimit memlock=-1 --ulimit stack=67108864 \
        --network bridge \
        --publish 8001:8001/udp  --publish 8181:8181 \
        --publish 1936:1936 --publish 1986:1986 \
        --volume /data:/data \
        --volume $TOP_DIR/app/conf/test.conf:/usr/local/srs/conf/test.conf \
        $REPOSITORY ./objs/srs -c conf/test.conf
}
__start__
